import request from './request';

// 请求首页的数据
export const GetHomeLists = () => request.get('/index/index')

// 历史记录和热门搜索数据的请求
export const GetPopupData = () => request.get("/search/index");

//清空历史记录
export const Clearhistory = () => request.post("/search/clearhistory")

//搜索提示列表
export const GetSearchTipsListData = (params) => request.get("/search/helper",{params});

// 获取搜索产品内容
export const GetSearchData = (params) => request.get("/goods/list",{params});

//品牌详情
export const GetBrandDetail = (params) => request.get("/brand/detail",{params});

//品牌详情中的产品列表
export const GetBrandDetailList = (params) => request.get("/brand/detail",{params});

//商页分类数据获取
export const GetChannel = (params) => request.get("/goods/category",{params});

//分类页面商品列表请求
export const GetChannelList = (params) => request.get("/goods/list",{params});

//专题页面数据请求
export const GetTopiclList = (params) => request.get("/topic/list",{params});

//全部分类数据接口/catalog/index
// 请求分类的数据
export const GetCateGoryLists = ()=> request.get('/catalog/index')

// 获取当前分类数据
export const GetCurrentCateGory = (params)=> request.get('/catalog/current',{params})

// 登录接口（没有账号自动注册）
export const loginByWeb = (params)=> request.post('/auth/loginByWeb',params)

// 商品详情产品明细
export const GetGoodsDetail = (params)=> request.get('/goods/detail',{params})

// 商品详情的相关产品
export const GetGoodsRelated = (params)=> request.get('/goods/related',{params})


// 获取购物车产品数量
export const GetGoodsCount = () => request.get("/cart/goodscount")

// 加入购物车
export const AddProductToCart = params => request.post("/cart/add",params)

// 获取购物车数据
export const GetCartListData = () => request.get("/cart/index")


// 点击切换商品选中状态
export const ChangeGoodChecked = params => request.post("/cart/checked",params)

// 步进器的请求
export const StepperChangeData = params => request.post("/cart/update",params)

// 删除商品
export const DeleteGood = params => request.post("/cart/delete",params)